# Maintainer: <waruqi@gmail.com>

_realname=xmake
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.1
pkgrel=2
pkgdesc="A make-like build utility based on Lua (mingw-w64)"
arch=('any')
url="https://github.com/xmake-io/xmake"
license=('Apache')
depends=("${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-readline")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/xmake-io/${_realname}/releases/download/v${pkgver}/${_realname}-v${pkgver}.tar.gz")
sha256sums=('c927efad5412c3bdb8bad1be5b1b2ea40a998dff2a252edb443782865b7472b9')

build() {
    cd "$srcdir"
    make build
}

package() {
    cd "$srcdir"
    make install DESTDIR="${pkgdir}" prefix="${MINGW_PREFIX}"
}
